package com.corpcredit.model;

// Generated Jul 22, 2008 11:56:54 PM by Hibernate Tools 3.2.0.CR1

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

/**
 * Glry generated by hbm2java
 */
@Entity
@Table(name = "glry", uniqueConstraints = @UniqueConstraint(columnNames = "ryid"))
public class Glry implements java.io.Serializable
{

    private Long id;
    private int version;
    private GlryZyjyglr glryZyjyglr;
    private GlryCwfzr glryCwfzr;
    private Jbqk jbqk;
    private GlryFddbr glryFddbr;
    private String username;
    private String operation;
    private Date optdate;
    private long ryid;
    private String zw;
    private String xmmc;
    private String csrq;
    private String xb;
    private String zjlx;
    private String zjhm;
    private String zgxl;
    private BigDecimal sjcg;
    private Boolean sfgd;
    private String qtqk;
    private Set<GlryZyjyglr> glryZyjyglrs = new HashSet<GlryZyjyglr>( 0 );
    private Set<GlryFddbr> glryFddbrs = new HashSet<GlryFddbr>( 0 );
    private Set<GlryShjz> glryShjzs = new HashSet<GlryShjz>( 0 );
    private Set<GlryJnzg> glryJnzgs = new HashSet<GlryJnzg>( 0 );
    private Set<GlryGzjl> glryGzjls = new HashSet<GlryGzjl>( 0 );
    private Set<GlryCwfzr> glryCwfzrs = new HashSet<GlryCwfzr>( 0 );

    public Glry()
    {
    }

    public Glry( Long id, long ryid, String zw )
    {
        this.id = id;
        this.ryid = ryid;
        this.zw = zw;
    }

    public Glry( Long id,
                 GlryZyjyglr glryZyjyglr,
                 GlryCwfzr glryCwfzr,
                 Jbqk jbqk,
                 GlryFddbr glryFddbr,
                 String username,
                 String operation,
                 Date optdate,
                 long ryid,
                 String zw,
                 String xmmc,
                 String csrq,
                 String xb,
                 String zjlx,
                 String zjhm,
                 String zgxl,
                 BigDecimal sjcg,
                 Boolean sfgd,
                 String qtqk,
                 Set<GlryZyjyglr> glryZyjyglrs,
                 Set<GlryFddbr> glryFddbrs,
                 Set<GlryShjz> glryShjzs,
                 Set<GlryJnzg> glryJnzgs,
                 Set<GlryGzjl> glryGzjls,
                 Set<GlryCwfzr> glryCwfzrs )
    {
        this.id = id;
        this.glryZyjyglr = glryZyjyglr;
        this.glryCwfzr = glryCwfzr;
        this.jbqk = jbqk;
        this.glryFddbr = glryFddbr;
        this.username = username;
        this.operation = operation;
        this.optdate = optdate;
        this.ryid = ryid;
        this.zw = zw;
        this.xmmc = xmmc;
        this.csrq = csrq;
        this.xb = xb;
        this.zjlx = zjlx;
        this.zjhm = zjhm;
        this.zgxl = zgxl;
        this.sjcg = sjcg;
        this.sfgd = sfgd;
        this.qtqk = qtqk;
        this.glryZyjyglrs = glryZyjyglrs;
        this.glryFddbrs = glryFddbrs;
        this.glryShjzs = glryShjzs;
        this.glryJnzgs = glryJnzgs;
        this.glryGzjls = glryGzjls;
        this.glryCwfzrs = glryCwfzrs;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId()
    {
        return this.id;
    }

    public void setId( Long id )
    {
        this.id = id;
    }

    @Version
    @Column(name = "version", nullable = false)
    public int getVersion()
    {
        return this.version;
    }

    public void setVersion( int version )
    {
        this.version = version;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "glr_ID")
    public GlryZyjyglr getGlryZyjyglr()
    {
        return this.glryZyjyglr;
    }

    public void setGlryZyjyglr( GlryZyjyglr glryZyjyglr )
    {
        this.glryZyjyglr = glryZyjyglr;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "glr_ID2")
    public GlryCwfzr getGlryCwfzr()
    {
        return this.glryCwfzr;
    }

    public void setGlryCwfzr( GlryCwfzr glryCwfzr )
    {
        this.glryCwfzr = glryCwfzr;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "jbq_ID")
    public Jbqk getJbqk()
    {
        return this.jbqk;
    }

    public void setJbqk( Jbqk jbqk )
    {
        this.jbqk = jbqk;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "glr_ID3")
    public GlryFddbr getGlryFddbr()
    {
        return this.glryFddbr;
    }

    public void setGlryFddbr( GlryFddbr glryFddbr )
    {
        this.glryFddbr = glryFddbr;
    }

    @Column(name = "username", length = 50)
    public String getUsername()
    {
        return this.username;
    }

    public void setUsername( String username )
    {
        this.username = username;
    }

    @Column(name = "operation", length = 20)
    public String getOperation()
    {
        return this.operation;
    }

    public void setOperation( String operation )
    {
        this.operation = operation;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "optdate", length = 23)
    public Date getOptdate()
    {
        return this.optdate;
    }

    public void setOptdate( Date optdate )
    {
        this.optdate = optdate;
    }

    @Column(name = "ryid", unique = true, nullable = false)
    public long getRyid()
    {
        return this.ryid;
    }

    public void setRyid( long ryid )
    {
        this.ryid = ryid;
    }

    @Column(name = "zw", nullable = false, length = 50)
    public String getZw()
    {
        return this.zw;
    }

    public void setZw( String zw )
    {
        this.zw = zw;
    }

    @Column(name = "xmmc", length = 50)
    public String getXmmc()
    {
        return this.xmmc;
    }

    public void setXmmc( String xmmc )
    {
        this.xmmc = xmmc;
    }

    @Column(name = "csrq", length = 20)
    public String getCsrq()
    {
        return this.csrq;
    }

    public void setCsrq( String csrq )
    {
        this.csrq = csrq;
    }

    @Column(name = "xb", length = 2)
    public String getXb()
    {
        return this.xb;
    }

    public void setXb( String xb )
    {
        this.xb = xb;
    }

    @Column(name = "zjlx", length = 10)
    public String getZjlx()
    {
        return this.zjlx;
    }

    public void setZjlx( String zjlx )
    {
        this.zjlx = zjlx;
    }

    @Column(name = "zjhm", length = 30)
    public String getZjhm()
    {
        return this.zjhm;
    }

    public void setZjhm( String zjhm )
    {
        this.zjhm = zjhm;
    }

    @Column(name = "zgxl", length = 20)
    public String getZgxl()
    {
        return this.zgxl;
    }

    public void setZgxl( String zgxl )
    {
        this.zgxl = zgxl;
    }

    @Column(name = "sjcg", precision = 18, scale = 4)
    public BigDecimal getSjcg()
    {
        return this.sjcg;
    }

    public void setSjcg( BigDecimal sjcg )
    {
        this.sjcg = sjcg;
    }

    @Column(name = "sfgd")
    public Boolean getSfgd()
    {
        return this.sfgd;
    }

    public void setSfgd( Boolean sfgd )
    {
        this.sfgd = sfgd;
    }

    @Column(name = "qtqk", length = 500)
    public String getQtqk()
    {
        return this.qtqk;
    }

    public void setQtqk( String qtqk )
    {
        this.qtqk = qtqk;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "glry")
    public Set<GlryZyjyglr> getGlryZyjyglrs()
    {
        return this.glryZyjyglrs;
    }

    public void setGlryZyjyglrs( Set<GlryZyjyglr> glryZyjyglrs )
    {
        this.glryZyjyglrs = glryZyjyglrs;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "glry")
    public Set<GlryFddbr> getGlryFddbrs()
    {
        return this.glryFddbrs;
    }

    public void setGlryFddbrs( Set<GlryFddbr> glryFddbrs )
    {
        this.glryFddbrs = glryFddbrs;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "glry")
    public Set<GlryShjz> getGlryShjzs()
    {
        return this.glryShjzs;
    }

    public void setGlryShjzs( Set<GlryShjz> glryShjzs )
    {
        this.glryShjzs = glryShjzs;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "glry")
    public Set<GlryJnzg> getGlryJnzgs()
    {
        return this.glryJnzgs;
    }

    public void setGlryJnzgs( Set<GlryJnzg> glryJnzgs )
    {
        this.glryJnzgs = glryJnzgs;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "glry")
    public Set<GlryGzjl> getGlryGzjls()
    {
        return this.glryGzjls;
    }

    public void setGlryGzjls( Set<GlryGzjl> glryGzjls )
    {
        this.glryGzjls = glryGzjls;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "glry")
    public Set<GlryCwfzr> getGlryCwfzrs()
    {
        return this.glryCwfzrs;
    }

    public void setGlryCwfzrs( Set<GlryCwfzr> glryCwfzrs )
    {
        this.glryCwfzrs = glryCwfzrs;
    }

}
